//
// Created by 86138 on 2025/5/20.
//

#ifndef QINGDAO_UNIVERSITY_LINKQUEUE_H
#define QINGDAO_UNIVERSITY_LINKQUEUE_H
#include "../01-intro/c1-1.h"

typedef int QElemType;

typedef struct QNode {
    QElemType Data;
    struct QNode *Next;
} QNode;

typedef QNode *PtrToQNode;

struct LinkQueue {
    PtrToQNode front;
    PtrToQNode rear;
};

void InitQueue(LinkQueue &Q);

void DestroyQueue(LinkQueue &Q);

Status EnQueue(LinkQueue &Q, QElemType e);

Status DeQueue(LinkQueue &Q, QElemType &e);

Status GetHead(LinkQueue Q, QElemType &e);
#endif //QINGDAO_UNIVERSITY_LINKQUEUE_H
